package com.net.xpay.common.manager.partner;

import com.net.xpay.common.domain.partner.PartnerCombinationSettleRecord;
import com.net.xpay.common.enums.partner.PartnerCombinationSettleRecordType;
import com.net.xpay.core.model.PartnerCombinationSettleRecordAggSearchModel;
import com.net.common.manager.DomainManager;

import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.List;


public interface PartnerCombinationSettleRecordManager extends DomainManager<Long, PartnerCombinationSettleRecord> {
    PartnerCombinationSettleRecord findByDayAndUserId(Long userId, LocalDate day, PartnerCombinationSettleRecordType type);

    int updateSettleInfo(Long partnerId, PartnerCombinationSettleRecordType type, LocalDate startDay, LocalDate endDay, LocalDateTime settleTime);

    List<PartnerCombinationSettleRecord> aggSearch(PartnerCombinationSettleRecordAggSearchModel searchModel);

    List<PartnerCombinationSettleRecord> aggList(PartnerCombinationSettleRecordAggSearchModel searchModel);

    long aggSearchCount(PartnerCombinationSettleRecordAggSearchModel searchModel);

    List<PartnerCombinationSettleRecord> partnerAggSearch(PartnerCombinationSettleRecordAggSearchModel searchModel);

    long partnerAggSearchCount(PartnerCombinationSettleRecordAggSearchModel searchModel);

    List<PartnerCombinationSettleRecord> aggSumUserMonthData(Long userId, LocalDate endDay);

    void bothSave(PartnerCombinationSettleRecord record, PartnerCombinationSettleRecord fatherRecord);
}
